#include <iostream>
#include <algorithm>
using namespace std;
 
string sum(string a, string b) {
    for (int i = a.size() - 1, j = b.size() - 1; i >= 0; -- i, -- j) {
        a[i] = char(a[i] + (j >= 0 ? b[j] - '0' : 0));
        if (a[i] - '0' >= 10) {
            a[i] = char((a[i] - '0') % 10 + '0');
            if (i) {
                a[i - 1] += 1;
            } else {
                a = '1' + a;
            }
        }
    }
    return a;
}
 
string fib[10000];
 
int main() {
    fib[0] = "0";
    fib[1] = "1";
    for (long long unsigned int i = 2; i <= 10000; ++ i) {
        fib[i] = sum(fib[i - 1], fib[i - 2]);
    }
    int x;
    cin >> x;
    cout<<fib[x]<< endl;
    return 0;
}